import { View, Text } from '@tarojs/components'
import Taro from '@tarojs/taro'
import './Mine.scss'

const Mine = () => {
  const goHome = () => {
    Taro.switchTab({ url: '/pages/home/home' })
  }

  const goToTimeReview = () => {
    Taro.navigateTo({ url: '/pages/mine/TimeReview' })
  }

  const goToTodayStatus = () => {
    Taro.navigateTo({ url: '/pages/mine/TodayStatus' })
  }

  const goToMyAchievement = () => {
    Taro.navigateTo({ url: '/pages/mine/MyAchievement' })
  }

  return (
    <View className='mine'>
      <View className='pageTitle'>
        <Text onClick={goHome} className='goBack'>
          {'<'}
        </Text>
        我的
      </View>

      <View className='operationList'>
        <View onClick={goToTodayStatus} className='operation-item'>
          <Text>今日状态统计分析</Text>
          <Text>{'>'}</Text>
        </View>
        <View onClick={goToMyAchievement} className='operation-item'>
          <Text>我的勋章墙</Text>
          <Text>{'>'}</Text>
        </View>
        <View className='operation-item'>
          <Text>我的角色信息</Text>
          <Text>{'>'}</Text>
        </View>
        <View onClick={goToTimeReview} className='operation-item'>
          <Text>时光机</Text>
          <Text>{'>'}</Text>
        </View>
      </View>
    </View>
  )
}

export default Mine